package com.sgb.kjwl.model.entity.transport;

import android.text.TextUtils;

import com.google.gson.annotations.SerializedName;

/**
 * Describe:
 * Author:  yangLei
 * Date:    2021/4/19
 */
public class SearchGoodsEntity {
    /**
     * 省名称
     */
    private String provinceName;

    /**
     * 市名称
     */
    private String cityName;

    /**
     * 区名称
     */
    private String districtName;

    /**
     * 途径发货地省名称
     */
    private String viaSendProvinceName;

    /**
     * 途径发货地市名称
     */
    private String viaSendCityName;

    /**
     * 途径发货地区名称
     */
    private String viaSendDistrictName;

    /**
     * 途径目的地省名称
     */
    private String viaDestProvinceName;

    /**
     * 途径目的地市名称
     */
    private String viaDestCityName;

    /**
     * 途径目的地区名称
     */
    private String viaDestDistrictName;

    /**
     * 目的地省名称
     */
    private String destProvinceName;

    /**
     * 目的地市名称
     */
    private String destCityName;

    /**
     * 目的地区名称
     */
    private String destDistrictName;

    /**
     * 货物类型名称
     */
    @SerializedName(value = "goodsTypeName", alternate = {"goodsModeName"})
    private String goodsTypeName;

    /**
     * 二级货物类型名称
     */
    @SerializedName(value = "secondGoodsTypeName")
    private String secondGoodsTypeName;

    /**
     * 重量
     */
    private String weight;

    /**
     * 车型名称
     */
    @SerializedName(value = "carTypeName", alternate = {"carModelName"})
    private String carModelName;

    /**
     * 车长名称
     */
    private String carLenName;

    /**
     * 栏高
     */
    private String heightHurdle;

    /**
     * 是否自卸 0不自卸 1自卸
     */
    private Integer isDump;

    /**
     * 装货时间
     */
    private Long shipmentTime;

    /**
     * 装货时间
     */
    private Long shipmentEndTime;

    /**
     * 联系人电话
     */
    private String contrctsNumber;

    /**
     * 货源编号
     */
    private String no;

    /**
     * 货源发布模式 0 普通模式  1 竞价模式
     */
    private Integer pattern;

    /**
     * 状态 0 待接单/竞价中  1 已成交/同意已结束   2 已失效/截止已结束
     */
    private Integer state;

    /**
     * 运费总价
     */
    private String allFreight;

    /**
     * 企业名称
     */
    private String companyName;

    /**
     * 个人姓名
     */
    private String username;

    /**
     * 团队名称
     */
    private String teamName;

    /**
     * 总运程
     */
    private String totalDistance;

    /**
     * 与货源的距离
     */
    private String distance;

    /**
     * 货源类型：中介、个人、货主
     */
    private String terminal;

    /**
     * 竞价货源的最低报价
     */
    private String lowestPrice;

    /**
     * 竞价货源的报价车数
     */
    private int intentionCarNumber;

    private String logo;

    /**
     * 运费选项 0一口价 1电议
     */
    private Integer freightType;

    /**
     * 运输方式 0 零担 1 整车
     */
    private Integer transportType;

    /**
     * 装车开始时间点  2.0.6
     * 25——表示全天
     */
    private int startPointTime;

    /**
     * 装车结束时间点  2.0.6
     * 25——表示全天
     */
    private int endPointTime;
    private String volume;
    //2.0.8新增
    private String offerType;

    private String teamNo;
    private String companyNo;
    private String userNo;

    private String connection;//联系人
    private String connectionPhone;//联系电话

    private String journey;//运程

    public String getJourney() {
        return journey;
    }

    public void setJourney(String journey) {
        this.journey = journey;
    }

    public String getConnection() {
        return connection;
    }

    public void setConnection(String connection) {
        this.connection = connection;
    }

    public String getConnectionPhone() {
        return connectionPhone;
    }

    public void setConnectionPhone(String connectionPhone) {
        this.connectionPhone = connectionPhone;
    }

    public String getTeamNo() {
        return TextUtils.isEmpty(teamNo) ? "" : teamNo;
    }

    public void setTeamNo(String teamNo) {
        this.teamNo = teamNo;
    }

    public String getCompanyNo() {
        return TextUtils.isEmpty(companyNo) ? "" : companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getUserNo() {
        return TextUtils.isEmpty(userNo) ? "" : userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getVolume() {
        return volume;
    }

    public void setVolume(String volume) {
        this.volume = volume;
    }

    public String getGoodsTypeName() {
        return goodsTypeName;
    }

    public void setGoodsTypeName(String goodsTypeName) {
        this.goodsTypeName = goodsTypeName;
    }

    public Integer getFreightType() {
        return freightType;
    }

    public void setFreightType(Integer freightType) {
        this.freightType = freightType;
    }

    public Integer getTransportType() {
        return transportType;
    }

    public void setTransportType(Integer transportType) {
        this.transportType = transportType;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getTerminal() {
        return TextUtils.isEmpty(terminal) ? "1" : terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    public String getLowestPrice() {
        return lowestPrice;
    }

    public void setLowestPrice(String lowestPrice) {
        this.lowestPrice = lowestPrice;
    }

    public int getIntentionCarNumber() {
        return intentionCarNumber;
    }

    public void setIntentionCarNumber(int intentionCarNumber) {
        this.intentionCarNumber = intentionCarNumber;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getViaSendProvinceName() {
        return viaSendProvinceName;
    }

    public void setViaSendProvinceName(String viaSendProvinceName) {
        this.viaSendProvinceName = viaSendProvinceName;
    }

    public String getViaSendCityName() {
        return viaSendCityName;
    }

    public void setViaSendCityName(String viaSendCityName) {
        this.viaSendCityName = viaSendCityName;
    }

    public String getViaSendDistrictName() {
        return viaSendDistrictName;
    }

    public void setViaSendDistrictName(String viaSendDistrictName) {
        this.viaSendDistrictName = viaSendDistrictName;
    }

    public String getViaDestProvinceName() {
        return viaDestProvinceName;
    }

    public void setViaDestProvinceName(String viaDestProvinceName) {
        this.viaDestProvinceName = viaDestProvinceName;
    }

    public String getViaDestCityName() {
        return viaDestCityName;
    }

    public void setViaDestCityName(String viaDestCityName) {
        this.viaDestCityName = viaDestCityName;
    }

    public String getViaDestDistrictName() {
        return viaDestDistrictName;
    }

    public void setViaDestDistrictName(String viaDestDistrictName) {
        this.viaDestDistrictName = viaDestDistrictName;
    }

    public String getDestProvinceName() {
        return destProvinceName;
    }

    public void setDestProvinceName(String destProvinceName) {
        this.destProvinceName = destProvinceName;
    }

    public String getDestCityName() {
        return destCityName;
    }

    public void setDestCityName(String destCityName) {
        this.destCityName = destCityName;
    }

    public String getDestDistrictName() {
        return destDistrictName;
    }

    public void setDestDistrictName(String destDistrictName) {
        this.destDistrictName = destDistrictName;
    }

    public String getGoodsModeName() {
        return goodsTypeName;
    }

    public void setGoodsModeName(String goodsModeName) {
        this.goodsTypeName = goodsModeName;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getCarModelName() {
        return carModelName;
    }

    public void setCarModelName(String carModelName) {
        this.carModelName = carModelName;
    }

    public String getCarLenName() {
        return carLenName;
    }

    public void setCarLenName(String carLenName) {
        this.carLenName = carLenName;
    }

    public String getHeightHurdle() {
        return heightHurdle;
    }

    public void setHeightHurdle(String heightHurdle) {
        this.heightHurdle = heightHurdle;
    }

    public Integer getIsDump() {
        return isDump;
    }

    public void setIsDump(Integer isDump) {
        this.isDump = isDump;
    }

    public Long getShipmentTime() {
        if (shipmentTime == null) {
            return 0l;
        } else
            return shipmentTime;
    }

    public void setShipmentTime(Long shipmentTime) {
        this.shipmentTime = shipmentTime;
    }

    public Long getShipmentEndTime() {
        if (shipmentEndTime == null) {
            return 0l;
        } else
            return shipmentEndTime;
    }

    public void setShipmentEndTime(Long shipmentEndTime) {
        this.shipmentEndTime = shipmentEndTime;
    }

    public String getContrctsNumber() {
        return contrctsNumber;
    }

    public void setContrctsNumber(String contrctsNumber) {
        this.contrctsNumber = contrctsNumber;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Integer getPattern() {
        return pattern;
    }

    public void setPattern(Integer pattern) {
        this.pattern = pattern;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getAllFreight() {
        return allFreight;
    }

    public void setAllFreight(String allFreight) {
        this.allFreight = allFreight;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getTotalDistance() {
        return totalDistance;
    }

    public void setTotalDistance(String totalDistance) {
        this.totalDistance = totalDistance;
    }

    public int getStartPointTime() {
        return startPointTime;
    }

    public void setStartPointTime(int startPointTime) {
        this.startPointTime = startPointTime;
    }

    public int getEndPointTime() {
        return endPointTime;
    }

    public void setEndPointTime(int endPointTime) {
        this.endPointTime = endPointTime;
    }

    public String getOfferType() {
        return offerType;
    }

    public void setOfferType(String offerType) {
        this.offerType = offerType;
    }

    public String getOfferTypeWorlds() {
        if (TextUtils.isEmpty(offerType))return "";
        StringBuffer other = new StringBuffer();
        String[] strArray = offerType.split(",");
        for (int i = 0;i<strArray.length;i++){
            if ("1".equals(strArray[i])){
                other.append("企业");
            }else if ("2".equals(strArray[i])){
                if (other.length()!=0){
                    other.append("/");
                }
                other.append("团队");
            }else if ("3".equals(strArray[i])){
                if (other.length()!=0){
                    other.append("/");
                }
                other.append("个人（司机）");
            }
        }
        return other.toString();
    }

    public String getSecondGoodsTypeName() {
        return secondGoodsTypeName;
    }

    public void setSecondGoodsTypeName(String secondGoodsTypeName) {
        this.secondGoodsTypeName = secondGoodsTypeName;
    }

    public String getGoodsLastTypeName() {
        String name = "";
        if (!TextUtils.isEmpty(secondGoodsTypeName)) {
            name = secondGoodsTypeName;
        } else if (!TextUtils.isEmpty(goodsTypeName)) {
            name = goodsTypeName;
        }
        return name;
    }
}
